class Person {
  readonly name: string;
  age: number;

  constructor(name: string, age: number) {
    this.name = name;
    this.age = age;
  }
}

const p = new Person("zs", 12);
console.log(p.name, p.age);

p.age = 20;
// 只读属性不能写入
// p.name = 'ls'

export {};
